<form class="form-horizontal" method="post" width="500px">
  <fieldset>
    <legend>编辑会员</legend>
    <div class="form-group">
      <label for="name" class="col-sm-2 control-label">姓名</label>
      <div class="col-sm-10">
        <input type="text" name="name" class="form-control" id="name" placeholder="输入姓名" value="<%= u.name %>"/>
      </div>
    </div>  
    <div class="form-group">
      <label for="rankType" class="col-sm-2 control-label">级别</label>
      <div class="col-sm-10">
        <select class="form-control" name="rankType">
            <% locals.ranks.forEach(function(rank,index){ 
              if(u.rankType == rank.type) {
            %>
            <option value="<%= rank.type %>" checked><%= rank.type %></option>
            <% } else { %>
            <option value="<%= rank.type %>"><%= rank.type %></option>
            <% }}); %>
        </select>
     </div>
    </div>  
    <div class="form-group">
      <label for="sex" class="col-sm-2 control-label">性别</label>
      <div class="col-sm-10">
        <label class="radio-inline">
          <input type="radio" id="inlineCheckbox2" name="sex" value="男" <% if(u.sex=='男') {%> checked <%}%> />男
        </label> 
        <label class="radio-inline">
          <input type="radio" id="inlineCheckbox1" name="sex" value="女" <% if(u.sex=='女') {%> checked <%}%> /> 女
        </label> 
      </div>
    </div> 
    <div class="form-group">
      <label for="birthday" class="col-sm-2 control-label">生日</label>
      <div class="col-sm-10">
        <input type="date" name="birthday" class="form-control" id="birthday" placeholder="生日" value="<%= u.birthday %>"/>
      </div>
    </div>
    <div class="form-group">
      <label for="tel" class="col-sm-2 control-label">电话</label>
      <div class="col-sm-10">
        <input type="tel" name="tel" class="form-control" id="tel" placeholder="电话" value="<%= u.tel %>"/>
      </div>
    </div> 
    <div class="form-actions">
      <button type="submit" class="btn btn-primary">保存</button>
      <button type="button" class="btn btn-default" onclick="javascript:history.back(-1)">取消</button>
    </div>
  </fieldset>
</form>